﻿<?php 
session_start();

if(!isset($_SESSION['id'])){
	header('Location:login.php');
}
	$username=$_SESSION['username'];
	$db=new PDO("mysql:host=localhost;dbname=shenji","root","");
	$db->query("set names utf8");
	$result4=$db->prepare("select * from user where username='$username'");
	$result4->execute();
	$count4=$result4->rowCount();
	
	if($count4==0){
		echo "<script>alert('用户不存在，请重新登录！');top.location.href='./login.php'</script>";
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js/jquery.js"></script>

<script type="text/javascript">


$(function(){	
	//导航切换
	$(".menuson .header").click(function(){
		var $parent = $(this).parent();
		$(".menuson>li.active").not($parent).removeClass("active open").find('.sub-menus').hide();
		
		$parent.addClass("active");
		if(!!$(this).next('.sub-menus').size()){
			if($parent.hasClass("open")){
				$parent.removeClass("open").find('.sub-menus').hide();
			}else{
				$parent.addClass("open").find('.sub-menus').show();	
			}
			
			
		}
	});
	
	// 三级菜单点击
	$('.sub-menus li').click(function(e) {
        $(".sub-menus li.active").removeClass("active")
		$(this).addClass("active");
    });
	
	$('.title').click(function(){
		var $ul = $(this).next('ul');
		$('dd').find('.menuson').slideUp();
		if($ul.is(':visible')){
			$(this).next('.menuson').slideUp();
		}else{
			$(this).next('.menuson').slideDown();
		}
	});
})	
</script>
</head>
<body style="background:#f0f9fd;">

	<div class="lefttop"><span></span>功能列表</div>
	<dl class="leftmenu">   
		<dd>
		<div class="title">
		<span><img src="images/leftico01.png" /></span>用户管理
		</div>
    	<ul class="menuson">
        <li><cite></cite><a href="insert_user.php" target="right">新建用户</a><i></i></li>
		<li><cite></cite><a href="select_user.php" target="right">用户列表</a><i></i></li>
        </ul>   
		</dd>
		
		<dd>
		<div class="title">
		<span><img src="images/leftico02.png" /></span>接口配置
		</div>
		<ul class="menuson">
        <li><cite></cite><a href="insert_jiekou.php" target="right">添加机器码</a><i></i></li>
		<li><cite></cite><a href="select_jiekou.php" target="right">机器码列表</a><i></i></li>
		<li><cite></cite><a href="txt.php" target="right">机器码文件导入</a><i></i></li>
		<li><cite></cite><a href="select_jiekou2.php" target="right">处理候选机器码</a><i></i></li>
        </ul>     
		</dd>
		
		<dd>
		<div class="title">
		<span><img src="images/leftico02.png" /></span>升级管理
		</div>
		<ul class="menuson">
        <li><cite></cite><a href="way_shenji.php" target="right">升级方式</a><i></i></li>
		<li><cite></cite><a href="ck_shenji.php" target="right">查看版本</a><i></i></li>
        </ul>     
		</dd>
		
		<dd>
		<div class="title">
		<span><img src="images/leftico02.png" /></span>项目管理
		</div>
		<ul class="menuson">
        <li><cite></cite><a href="insert_xiangmu.php" target="right">添加项目</a><i></i></li>
        <li><cite></cite><a href="select_xiangmu.php" target="right">项目列表</a><i></i></li>
        </ul>     
		</dd>
   </dl>
    
</body>
</html>
